from sqlalchemy import Column, BigInteger, String, Integer, Boolean
from sqlalchemy.sql import func

from config.Database import Base

class Notification(Base):
    __tablename__ = "notification"
    
    id = Column(BigInteger, primary_key=True, index=True)
    email = Column(String(20), index=True)
    count = Column(Integer, default=0)
    isDelete = Column(Boolean, default=False)
    
    def to_dict(self):
        return {
            "id": self.id,
            "email": self.email,
            "count": self.count,
            "isDelete": self.isDelete
        }